import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 加载axios
import axios from 'axios'
import VueAxios from 'vue-axios'
// 加载 element
import './plugins/element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'element-ui/lib/theme-chalk/display.css'
// 图标字体
import './../public/iconfont/iconfont.css'
// 导入markdown
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'

import VueCookie from 'vue-cookie'
axios.interceptors.response.use(function (res) {
  const response = res.data
  if (res.status === 200) {
    return response.data
  }
})
Vue.use(VueCookie)
Vue.config.productionTip = false
Vue.use(VueAxios, axios)
Vue.use(mavonEditor)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
